package com.hzsai;

import com.hzsai.config.DemoConfig;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;

/**
 * 需要配合多数据源，就需要取消数据源的自动配置，
 * springboot自动数据源配置会配置配置文件里面的
 * springboot.datasource.*
 */
@ServletComponentScan(basePackages = {"com.hzsai.web.servlet"})
@SpringBootApplication(scanBasePackages = {"com.hzsai"}, exclude = {DataSourceAutoConfiguration.class})
public class SpringAOPApplication {

    public static void main(String[] args) {

        new SpringApplicationBuilder().bannerMode(Banner.Mode.LOG).build().run(SpringAOPApplication.class, args);

//        new SpringApplicationBuilder().build().run(SpringAOPApplication.class, args);

//        SpringApplication.run(SpringAOPApplication.class, args);
//        System.out.println("DODOBIRD...");
//        System.out.println();
    }

}
